@extends('admin.common')
@section('title') - @lang('admin.common.login-title') @stop
@section('head')
    <style>
        .header {
            text-align: center;
        }
        .header h1 {
            font-size: 200%;
            color: #333;
            margin-top: 30px;
        }
        .header p {
            font-size: 14px;
        }
    </style>
    <style type="text/css">

        body {
            background-color: #666666;
            background-image: url("");
            background-repeat: no-repeat;
            background-position: center top;
            background-attachment: fixed;
            background-clip: border-box;
            background-size: cover;
            background-origin: padding-box;
            width: 100%;
            padding: 0;
            height: 100%;
            margin: 0;
            display: block;
            position: absolute;
        }
    </style>
@stop
@section('body')
    <div class="login-layout">
        <div class="top">
            <h5>COFFEE MANOR【B2B2C】电商系统<em></em></h5>
            <h2 style="margin-top: 20px">平台管理中心</h2>
            <h6 style="margin-top: 0px">商城</h6>
        </div>
        <div class="box">
            <form method="post" id="form_login" action="{{ route('admin.login') }}">
                {{ csrf_field() }}
                <input type='hidden' name='formhash' value='RpUIjHR6lYwMnIQEkIWm8gIY5S6L5SL' />
                <input type="hidden" name="form_submit" value="ok" />
                <input type="hidden" name="SiteUrl" id="SiteUrl" value="http://coffee000.fslit.com" />
      <span>
      <label>帐号</label>
      <input name="user" id="user_name" autocomplete="off" value="{{ old('user') }}" type="text" class="input-text" required>
      </span> <span>
      <label>密码</label>
      <input name="password" id="password" class="input-password" autocomplete="off" type="password" required pattern="[\S]{6}[\S]*"
             title="密码不少于6个字符">
      </span> <span>
      <div class="code">
          <div class="arrow"></div>
          <div class="code-img">
              <img src="{{ route('captcha.generate') }}" onclick="this.src='{{ route('captcha.generate') }}?v=' + Math.random() * 10" name="codeimage" id="codeimage" border="0"/></div>
          <a href="JavaScript:void(0);" id="hide" class="close" title="关闭"><i></i></a><a href="JavaScript:void(0);" onclick="" class="change" title="看不清,点击更换验证码"><i></i></a> </div>
      <input name="captcha" type="text" required class="input-code" id="captcha" placeholder="输入验证" pattern="[A-z0-9]{4}" title="验证码为4个字符" autocomplete="off" value="" style="height: 40px">
      </span> <span>
      <input name="nchash" type="hidden" value="55394b2c" />
      <input name="" style="height:  40px;width: 80px" class="am-btn am-btn-secondary" type="submit" value="登录">
      </span>
            </form>
        </div>
    </div>
    <div class="bottom">
        <h6 title="">
            Copyright 2015 COFFEE MANOR ,All rights reserved.
        </h6>
    </div>
    <script type="text/javascript">
        $(document).ready(function(){
            //Random background image
            var random_bg=Math.floor(Math.random()*4+1);
            var bg='url(http://coffee000.fslit.com/admin/templates/default/images/login/bg_'+random_bg+'.jpg)';
            $("body").css("background-image",bg);
            //Hide Show verification code
            $("#hide").click(function(){
                $(".code").fadeOut("slow");
            });
            $("#captcha").focus(function(){
                $(".code").fadeIn("fast");
            });
            //跳出框架在主窗口登录
            // if(top.location!=this.location)  top.location=this.location;
            //  $('#user_name').focus();
            //  if ($.browser.msie && $.browser.version=="6.0"){
            //      window.location.href='http://coffee000.fslit.com/admin/templates/default/ie6update.html';
            //  }
            //  $("#captcha").nc_placeholder();
        });
    </script>
@stop